﻿public abstract class FsmStateBase<T> : IFsmState<T>
{
    public object userData;
    public T StateType { get { return stateType; } }
    public FsmControllerBase<T> Controller { get { return controller; } }

    protected readonly T stateType;
    protected readonly FsmControllerBase<T> controller;

    public FsmStateBase(T stateType, FsmControllerBase<T> controller)
    {
        this.stateType = stateType;
        this.controller = controller;
    }

    public virtual void Enter(object e = null)
    {
        
    }

    public virtual void Update(float dt)
    {
        
    }

    public virtual bool CanTransTo(T state)
    {
        return true;
    }

    public virtual void Leave()
    {
        
    }
}